<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        body{
            margin: 0;
        }
        .d1 {
            width: 500px;
            height: 300px;
            background: green;
            overflow: hidden;
        }
        .d2 {
            height: 100px;
            width: 300px;
            margin: 100px auto;
            background: yellow;
            text-align: center;

            line-height: 100px;
        }
    </style>
</head>
<body>
<div class="d1">
    <div class="d2">11111111111</div>
</div>
</body>
</html>